<?php
require('../database/db.php');
$mysql=new mysql();

if($_REQUEST[phone]!=''){
	$phone = trim($_REQUEST[phone]);
}else{
	$arr = array('code' => 300, 'tip' =>'手机号码为空' ,'id' =>'手机号码不能为空');
	echo json_encode($arr);
	return;
}
$password = trim($_REQUEST[password]);

$sql = "SELECT * FROM `shop` where phone='$phone'";
$shophone=$mysql->getRow($sql);

	$arr=array(
		'phone'=>$phone,
		'password'=>$password
	);

if($shophone!=false){
	$arr = array('code' => 200, 'tip' =>'手机号码错误' ,'message' =>'手机号码已被注册');
}else{
	$arr = array('code' => 100, 'tip' =>'查询成功' ,'message' =>$arr);
}

echo json_encode($arr);

?>